Skip to content

Consolidate artifact reparse point checks - #10632

Merged
Amaury Levé (Evangelink) merged 1 commit into
mainfrom
dev/amauryleve/fix-issue-10601
Aug 18, 2026
Merged

Amaury Levé (Evangelink) merged 1 commit into
mainfrom
dev/amauryleve/fix-issue-10601

Conversation

@Evangelink

Copy link
Copy Markdown
Member

The JUnit, CTRF, HTML, and TRX artifact post-processors duplicated the same fail-closed reparse-point safety check, making future fixes prone to diverging across report formats.

This extracts the check into ArtifactPostProcessingHelper under SharedExtensionHelpers and source-links it into each report extension. The existing format-specific input ordering remains unchanged, and each assembly's internal API baseline now includes the shared helper.

Tests: Microsoft.Testing.Extensions.UnitTests (4,200 passed, 24 skipped)

Closes #10601

Move the fail-closed reparse-point detection used by report artifact post-processors into a shared linked helper so all report formats retain consistent safety behavior.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: ea064b28-6c4a-433f-9d0d-f5740d69d933
Copilot AI balanced review requested due to automatic review settings August 18, 2026 10:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Consolidates identical fail-closed reparse-point checks across the four artifact report processors.

Changes:

  • Adds a shared ArtifactPostProcessingHelper.
  • Source-links and adopts the helper in JUnit, CTRF, HTML, and TRX.
  • Updates each assembly’s internal API baseline.
Show a summary per file
File Description
SharedExtensionHelpers/ArtifactPostProcessingHelper.cs Defines the shared safety check.
TrxReport/TrxArtifactPostProcessor.cs Uses the shared helper.
TrxReport/Microsoft.Testing.Extensions.TrxReport.csproj Links the helper source.
TrxReport/InternalAPI/InternalAPI.Unshipped.txt Records the internal API.
JUnitReport/JUnitArtifactPostProcessor.cs Uses the shared helper.
JUnitReport/Microsoft.Testing.Extensions.JUnitReport.csproj Links the helper source.
JUnitReport/InternalAPI/InternalAPI.Unshipped.txt Records the internal API.
HtmlReport/HtmlArtifactPostProcessor.cs Uses the shared helper.
HtmlReport/Microsoft.Testing.Extensions.HtmlReport.csproj Links the helper source.
HtmlReport/InternalAPI/InternalAPI.Unshipped.txt Records the internal API.
CtrfReport/CtrfArtifactPostProcessor.cs Uses the shared helper.
CtrfReport/Microsoft.Testing.Extensions.CtrfReport.csproj Links the helper source.
CtrfReport/InternalAPI/InternalAPI.Unshipped.txt Records the internal API.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 13/13 changed files
  • Comments generated: 0
  • Review effort level: Balanced

@Evangelink Amaury Levé (Evangelink) added the state/needs-review Awaiting review from the team. label Aug 18, 2026
@Evangelink
Amaury Levé (Evangelink) enabled auto-merge (squash) August 18, 2026 10:24

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

🤖 Automated review by GitHub Copilot. Generated by the Expert Code Review workflow. To request a follow-up action, reply by tagging @copilot directly.

Review Summary

Clean deduplication refactor — extracts an identical IsReparsePoint helper from 4 artifact post-processors into a shared ArtifactPostProcessingHelper class. No behavioral change, no public API impact.

# Dimension Verdict
1 Algorithmic Correctness ✅ N/A — logic unchanged
2 Performance ✅ N/A
3 Thread Safety ✅ N/A — stateless static
4 Resource Management ✅ N/A
5 Error Handling ✅ Preserved
6 API Design ✅ Internal only, correct
7 Backward Compatibility ✅ No breaking change
8 Cross-TFM ✅ File.GetAttributes available on all targets
9 Security ✅ Reparse-point guard preserved
10 Localization ✅ N/A
11 Testing ✅ N/A — no new behavior
12 Naming & Style ✅ Consistent
13 Documentation ✅ XML doc retained
14 Public API Surface ✅ Internal only; InternalAPI.Unshipped.txt updated
15 Build Integration ✅ Compile includes added correctly
16 IPC Contracts ✅ N/A
17 Observability ✅ N/A
18 Disposal & Lifetime ✅ N/A
19 Configuration ✅ N/A
20 Extensibility ✅ N/A
21 Scope Discipline ✅ Single concern
22 Follow-up Tracking ✅ N/A

Verdict: No issues found. This is a straightforward DRY refactor with no risk. LGTM.

@Evangelink
Amaury Levé (Evangelink) merged commit 976b362 into main Aug 18, 2026
29 checks passed
@Evangelink
Amaury Levé (Evangelink) deleted the dev/amauryleve/fix-issue-10601 branch August 18, 2026 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

state/needs-review Awaiting review from the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[duplicate-code] Duplicate Code: Identical IsReparsePoint helper duplicated across 4 artifact post-processors

3 participants